home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / shadez.swf / scripts / Local / Game / Thing / CShotClusterBomb.as < prev    next >
Encoding:
Text File  |  2011-08-19  |  2.2 KB  |  85 lines

  1. package Local.Game.Thing
  2. {
  3.    import Local.Game.World.*;
  4.    import Local.Game.World.Map.*;
  5.    import Local.Game.World.Map.Cell.*;
  6.    import Local.Math.*;
  7.    import STC9.System.*;
  8.    import flash.display.*;
  9.    import flash.events.*;
  10.    import flash.geom.*;
  11.    
  12.    public class CShotClusterBomb extends CShot
  13.    {
  14.        
  15.       
  16.       private var mPath:CPath;
  17.       
  18.       private var mFlare:CThingAnimation;
  19.       
  20.       public function CShotClusterBomb(param1:*)
  21.       {
  22.          var _loc2_:CPosition = null;
  23.          if(true)
  24.          {
  25.             _loc2_ = param1 is CPosition ? param1 : param1.mPosition;
  26.             super(new CPosition(_loc2_.x,-200));
  27.             mType = "clusterbomb";
  28.             Process = Process_Normal;
  29.             mAngle = CAngle.AsAngle256(64);
  30.             mDelta = new CPosition(0,10);
  31.             mMaxLife = mLife = 1;
  32.             mOrientation = 1;
  33.             mShowOnMap = true;
  34.             AddAnimation("stand",ClusterBomb,"AddSprite_Black");
  35.             return;
  36.          }
  37.          ┬º┬ºgoto(addr18);
  38.       }
  39.       
  40.       override public function Draw() : void
  41.       {
  42.          super.Draw();
  43.          DrawSprite(GetOrientationMatrix());
  44.       }
  45.       
  46.       public function Process_Normal() : void
  47.       {
  48.          var _loc1_:int = 0;
  49.          mDelta.y += 1;
  50.          if(mDelta.y > 20)
  51.          {
  52.             mDelta.y = 20;
  53.          }
  54.          Move(mDelta);
  55.          if(mPosition.y >= 100)
  56.          {
  57.             Explode(mDelta);
  58.             AddThing(new CEffectExplosionSmall(mPosition.Clone()));
  59.             _loc1_ = 80;
  60.             loop0:
  61.             while(true)
  62.             {
  63.                ┬º┬ºpush(_loc1_);
  64.                while(┬º┬ºpop())
  65.                {
  66.                   mParent.AddThing(new CShotClusterBombFragment(mPosition.Clone(),mDelta));
  67.                   ┬º┬ºpush(_loc1_);
  68.                   if(true)
  69.                   {
  70.                      continue loop0;
  71.                   }
  72.                }
  73.                Dispose();
  74.                return;
  75.             }
  76.          }
  77.          else
  78.          {
  79.             Process_Children();
  80.             return;
  81.          }
  82.       }
  83.    }
  84. }
  85.